﻿using System.Configuration;

namespace SiteUnity.Frame.Common.Tools
{
    public class Setting
    {
        public static string GetAppSetting(string key)
        {
            string result = string.Empty;

            if (ConfigurationManager.AppSettings[key] != null)
                return ConfigurationManager.AppSettings[key].ToString();
            else if (ConfigurationManager.ConnectionStrings[key] != null)
                return ConfigurationManager.ConnectionStrings[key].ToString();

            return result;
        }
    }
}
